package cn.lynu.study.file_io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;


public class LoadObjectFromFile {

	public static void main(String[] args) throws IOException, ClassNotFoundException {
		ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File("student.dat")));
		Student student = (Student) ois.readObject();
		ois.close();
		
		System.out.println(student);

	}

}
